package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.DriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RequestMapping("driver")
@RestController
public class DriverController {
    @Autowired
    private DriverService driverService;

    /**
     * 获取司机详情
     * @return
     * @throws Exception
     */
    @RequestMapping("getDriverInfo")
    public ResponseParams<?> getDriverInfo() throws Exception {
        return driverService.getDriverInfo();
    }


    /**
     * 删除司机
     * @return
     * @throws Exception
     */
    @RequestMapping("delete")
    public ResponseParams<?> delete() throws Exception {
        return driverService.delete();
    }


    /**
     * 审核司机
     * @return
     * @throws Exception
     */
    @RequestMapping("exam")
    public ResponseParams<?> exam() throws Exception {
        return driverService.exam();
    }

    /**
     * 获取司机列表
     * @return
     * @throws Exception
     */
    @RequestMapping("getDriverList")
    public ResponseParams<?> getDriverList() throws Exception {
        return driverService.getDriverList();
    }

}
